<template>
  <div>
    生命周期（包含子组件）
    <input type="text" v-model="val" >
  </div>
</template>

<script>
export default {
  data() {
    return {
      val: ''
    }
  },
  beforeCreate() {
    console.log('child -> ', 'beforeCreate')
  },
  created() {
    console.log('child -> ', 'created')
  },
  beforeMount() {
    console.log('child -> ', 'beforeMount')
  },
  mounted() {
    console.log('child -> ', 'mounted')
  },
  beforeUpdate() {
    console.log('child -> ', 'beforeUpdate')
  },
  updated() {
    console.log('child -> ', 'updated')
  },
  beforeDestroy() {
    console.log('child -> ', 'beforeDestroy')
  },
  destroyed() {
    console.log('child -> ', 'destroyed')
  },
}
</script>
